package com.peanut.baby.mvp.profileedit;

import android.app.Activity;

import com.peanut.baby.model.AuthrizeInfo;
import com.peanut.baby.model.UploadConf;
import com.peanut.baby.mvp.BasePresenter;
import com.peanut.baby.mvp.BaseView;

import java.util.List;

/**
 * Created by anonymouslystudio on 2017/7/17.
 */

public interface ProfileEditContract {
    interface View extends BaseView{
        void onPermissionGranted(List<String> grantPermissions);
        void onPermissionDenied(List<String> deniedPermissions);
        void onPictureUploadFinished(boolean success, String failReason, UploadConf config);
        void onUpdateInfoSuccess();
        void onRequestFailed(String code, String reason);
        void onAuthSuccess(AuthrizeInfo info);
        void onBindWeixinSuccess();
    }

    interface Presenter extends BasePresenter{
        void checkPermission(Activity ctx);
        void compressAndUploadPhoto(String path);
        void updateUserInfo(String newAvatar, String newNick, String newGender, String sign, int newAge, String newProvince,int userStatus);
        void wxAuth();
        void bindWeixin(String openId, String accessToken, String expireIn, String unionId);
    }
}
